package com.donn.securitycontrolplatform.userwhitelist.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.donn.securitycontrolplatform.db1.mapper.TUserWhiteListMapper;
import com.donn.securitycontrolplatform.userwhitelist.entity.TUserWhiteList;
import com.donn.securitycontrolplatform.userwhitelist.service.ITUserWhiteListService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户信息表 服务实现类
 * </p>
 *
 * @author zhenglixiang
 * @since 2022-06-10
 */
@Service
@Slf4j
public class TUserWhiteListServiceImpl extends ServiceImpl<TUserWhiteListMapper, TUserWhiteList> implements ITUserWhiteListService {


    @Override
    public TUserWhiteList getByUserId(Integer userId) {
        QueryWrapper<TUserWhiteList> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq(TUserWhiteList.USER_ID, userId);
        return getOne(queryWrapper);
    }
}
